import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import './plugins/element';
import './assets/css/global.css';
import './assets/iconfont/iconfont.css';

//注册axios
import axios from './axios/index';
axios.defaults.baseURL = 'http://127.0.0.1:5000/';
Vue.prototype.$http = axios;
Vue.config.productionTip = false;

// 注册全局通用组件
import HeadTag from './components/HeadTag.vue';
import Table from './components/Table.vue';
import Search from './components/Search.vue';
Vue.component('HeadTag', HeadTag);
Vue.component('Table', Table);
Vue.component('Search', Search);

//注册工具函数
import formatDate from './utils/formatDate';
Vue.prototype.$formatDate = formatDate;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
